home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK2.toast / Development Kits (Disc 2) / QuickTime / QuickTime™ 2.5 / Interfaces for Programmers / AIncludes / Components.a next >
Encoding:
Text File  |  1997-02-26  |  21.2 KB  |  848 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Components.a
  3. ;
  4. ;    Contains:    QuickTime interfaces
  5. ;
  6. ;    Version:    Technology:    
  7. ;                Release:    QuickTime 2.5 interfaces to use with ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  19. __COMPONENTS__ SET 1
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  28.     include 'Memory.a'
  29.     ENDIF
  30.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  31.     include 'MixedMode.a'
  32.     ENDIF
  33.  
  34. kAppleManufacturer                EQU        'appl'                ; Apple supplied components 
  35. kComponentResourceType            EQU        'thng'                ; a components resource type 
  36.  
  37. kAnyComponentType                EQU        0
  38. kAnyComponentSubType            EQU        0
  39. kAnyComponentManufacturer        EQU        0
  40. kAnyComponentFlagsMask            EQU        0
  41.  
  42. cmpWantsRegisterMessage            EQU        $80000000
  43.  
  44. kComponentOpenSelect            EQU        -1                    ; ComponentInstance for this open 
  45. kComponentCloseSelect            EQU        -2                    ; ComponentInstance for this close 
  46. kComponentCanDoSelect            EQU        -3                    ; selector # being queried 
  47. kComponentVersionSelect            EQU        -4                    ; no params 
  48. kComponentRegisterSelect        EQU        -5                    ; no params 
  49. kComponentTargetSelect            EQU        -6                    ; ComponentInstance for top of call chain 
  50. kComponentUnregisterSelect        EQU        -7                    ; no params 
  51. kComponentGetMPWorkFunctionSelect EQU    -8                    ; some params 
  52. ;  Component Resource Extension flags 
  53.  
  54. componentDoAutoVersion            EQU        $01
  55. componentWantsUnregister        EQU        $02
  56. componentAutoVersionIncludeFlags EQU    $04
  57. componentHasMultiplePlatforms    EQU        $08
  58. ;  Set Default Component flags 
  59.  
  60. defaultComponentIdentical        EQU        0
  61. defaultComponentAnyFlags        EQU        1
  62. defaultComponentAnyManufacturer    EQU        2
  63. defaultComponentAnySubType        EQU        4
  64. defaultComponentAnyFlagsAnyManufacturer EQU 3
  65. defaultComponentAnyFlagsAnyManufacturerAnySubType EQU 7
  66. ;  RegisterComponentResource flags 
  67.  
  68. registerComponentGlobal            EQU        1
  69. registerComponentNoDuplicates    EQU        2
  70. registerComponentAfterExisting    EQU        4
  71. ComponentDescription    RECORD 0
  72. componentType             ds.l    1                ; offset: $0 (0)        ;  A unique 4-byte code indentifying the command set 
  73. componentSubType         ds.l    1                ; offset: $4 (4)        ;  Particular flavor of this instance 
  74. componentManufacturer     ds.l    1                ; offset: $8 (8)        ;  Vendor indentification 
  75. componentFlags             ds.l    1                ; offset: $C (12)        ;  8 each for Component,Type,SubType,Manuf/revision 
  76. componentFlagsMask         ds.l    1                ; offset: $10 (16)        ;  Mask for specifying which flags to consider in search, zero during registration 
  77. sizeof                     EQU *                    ; size:   $14 (20)
  78.                         ENDR
  79. ResourceSpec            RECORD 0
  80. resType                     ds.l    1                ; offset: $0 (0)        ;  4-byte code     
  81. resID                     ds.w    1                ; offset: $4 (4)        ;               
  82. sizeof                     EQU *                    ; size:   $6 (6)
  83.                         ENDR
  84. ComponentResource        RECORD 0
  85. cd                         ds        ComponentDescription ; offset: $0 (0)    ;  Registration parameters 
  86. component                 ds        ResourceSpec    ; offset: $14 (20)        ;  resource where Component code is found 
  87. componentName             ds        ResourceSpec    ; offset: $1A (26)        ;  name string resource 
  88. componentInfo             ds        ResourceSpec    ; offset: $20 (32)        ;  info string resource 
  89. componentIcon             ds        ResourceSpec    ; offset: $26 (38)        ;  icon resource 
  90. sizeof                     EQU *                    ; size:   $2C (44)
  91.                         ENDR
  92. ; typedef struct ComponentResource *    ComponentResourcePtr
  93.  
  94. ; typedef ComponentResourcePtr *        ComponentResourceHandle
  95.  
  96. ComponentPlatformInfo    RECORD 0
  97. componentFlags             ds.l    1                ; offset: $0 (0)        ;  flags of Component 
  98. component                 ds        ResourceSpec    ; offset: $4 (4)        ;  resource where Component code is found 
  99. platformType             ds.w    1                ; offset: $A (10)        ;  gestaltSysArchitecture result 
  100. sizeof                     EQU *                    ; size:   $C (12)
  101.                         ENDR
  102. ComponentResourceExtension RECORD 0
  103. componentVersion         ds.l    1                ; offset: $0 (0)        ;  version of Component 
  104. componentRegisterFlags     ds.l    1                ; offset: $4 (4)        ;  flags for registration 
  105. componentIconFamily         ds.w    1                ; offset: $8 (8)        ;  resource id of Icon Family 
  106. sizeof                     EQU *                    ; size:   $A (10)
  107.                         ENDR
  108. ComponentPlatformInfoArray RECORD 0
  109. count                     ds.l    1                ; offset: $0 (0)
  110. platformArray             ds        ComponentPlatformInfo ; offset: $4 (4) <-- really an array of length one
  111. sizeof                     EQU *                    ; size:   $10 (16)
  112.                         ENDR
  113. ExtComponentResource    RECORD 0
  114. cd                         ds        ComponentDescription ; offset: $0 (0)    ;  registration parameters 
  115. component                 ds        ResourceSpec    ; offset: $14 (20)        ;  resource where Component code is found 
  116. componentName             ds        ResourceSpec    ; offset: $1A (26)        ;  name string resource 
  117. componentInfo             ds        ResourceSpec    ; offset: $20 (32)        ;  info string resource 
  118. componentIcon             ds        ResourceSpec    ; offset: $26 (38)        ;  icon resource 
  119. componentVersion         ds.l    1                ; offset: $2C (44)        ;  version of Component 
  120. componentRegisterFlags     ds.l    1                ; offset: $30 (48)        ;  flags for registration 
  121. componentIconFamily         ds.w    1                ; offset: $34 (52)        ;  resource id of Icon Family 
  122. count                     ds.l    1                ; offset: $36 (54)        ;  elements in platformArray 
  123. platformArray             ds        ComponentPlatformInfo ; offset: $3A (58) <-- really an array of length one
  124. sizeof                     EQU *                    ; size:   $46 (70)
  125.                         ENDR
  126. ;   Structure received by Component:        
  127. ComponentParameters        RECORD 0
  128. flags                     ds.b    1                ; offset: $0 (0)        ;  call modifiers: sync/async, deferred, immed, etc 
  129. paramSize                 ds.b    1                ; offset: $1 (1)        ;  size in bytes of actual parameters passed to this call 
  130. what                     ds.w    1                ; offset: $2 (2)        ;  routine selector, negative for Component management calls 
  131. params                     ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  actual parameters for the indicated routine 
  132. sizeof                     EQU *                    ; size:   $8 (8)
  133.                         ENDR
  134. ComponentRecord            RECORD 0
  135. data                     ds.l    1                ; offset: $0 (0) <-- really an array of length one
  136. sizeof                     EQU *                    ; size:   $4 (4)
  137.                         ENDR
  138. ; typedef struct ComponentRecord *        Component
  139.  
  140. ComponentInstanceRecord    RECORD 0
  141. data                     ds.l    1                ; offset: $0 (0) <-- really an array of length one
  142. sizeof                     EQU *                    ; size:   $4 (4)
  143.                         ENDR
  144. ; typedef struct ComponentInstanceRecord * ComponentInstance
  145.  
  146. RegisteredComponentRecord RECORD 0
  147. data                     ds.l    1                ; offset: $0 (0) <-- really an array of length one
  148. sizeof                     EQU *                    ; size:   $4 (4)
  149.                         ENDR
  150. ; typedef struct RegisteredComponentRecord * RegisteredComponentPtr
  151.  
  152. RegisteredComponentInstanceRecord RECORD 0
  153. data                     ds.l    1                ; offset: $0 (0) <-- really an array of length one
  154. sizeof                     EQU *                    ; size:   $4 (4)
  155.                         ENDR
  156. ; typedef struct RegisteredComponentInstanceRecord * RegisteredComponentInstancePtr
  157.  
  158. ; typedef long                             ComponentResult
  159.  
  160.  
  161. mpWorkFlagDoWork                EQU        $01
  162. mpWorkFlagDoCompletion            EQU        $02
  163. mpWorkFlagCopyWorkBlock            EQU        $04
  164. mpWorkFlagDontBlock                EQU        $08
  165. mpWorkFlagGetProcessorCount        EQU        $10
  166. mpWorkFlagGetIsRunning            EQU        $40
  167. ComponentMPWorkFunctionHeaderRecord RECORD 0
  168. headerSize                 ds.l    1                ; offset: $0 (0)
  169. recordSize                 ds.l    1                ; offset: $4 (4)
  170. workFlags                 ds.l    1                ; offset: $8 (8)
  171. processorCount             ds.w    1                ; offset: $C (12)
  172. unused                     ds.b    1                ; offset: $E (14)
  173. isRunning                 ds.b    1                ; offset: $F (15)
  174. sizeof                     EQU *                    ; size:   $10 (16)
  175.                         ENDR
  176. ; typedef struct ComponentMPWorkFunctionHeaderRecord * ComponentMPWorkFunctionHeaderRecordPtr
  177.  
  178. ;
  179. ;    The parameter list for each ComponentFunction is unique. It is 
  180. ;    therefore up to users to create the appropriate procInfo for their 
  181. ;    own ComponentFunctions where necessary.
  182. ;
  183. ; typedef UniversalProcPtr                 ComponentFunctionUPP
  184.  
  185. ;
  186. ;*******************************************************
  187. ;*                                                        *
  188. ;*                  APPLICATION LEVEL CALLS                    *
  189. ;*                                                        *
  190. ;*******************************************************
  191. ;
  192. ;
  193. ;*******************************************************
  194. ;* Component Database Add, Delete, and Query Routines 
  195. ;*******************************************************
  196. ;
  197. ;
  198. ; pascal Component RegisterComponent(ComponentDescription *cd, ComponentRoutineUPP componentEntryPoint, short global, Handle componentName, Handle componentInfo, Handle componentIcon)
  199. ;
  200.     IF ¬ GENERATINGCFM THEN
  201.         Macro
  202.         _RegisterComponent
  203.             moveq               #1,d0
  204.             dc.w                $A82A
  205.         EndM
  206.     ELSE
  207.         IMPORT_CFM_FUNCTION RegisterComponent
  208.     ENDIF
  209.  
  210. ;
  211. ; pascal Component RegisterComponentResource(ComponentResourceHandle cr, short global)
  212. ;
  213.     IF ¬ GENERATINGCFM THEN
  214.         Macro
  215.         _RegisterComponentResource
  216.             moveq               #18,d0
  217.             dc.w                $A82A
  218.         EndM
  219.     ELSE
  220.         IMPORT_CFM_FUNCTION RegisterComponentResource
  221.     ENDIF
  222.  
  223. ;
  224. ; pascal OSErr UnregisterComponent(Component aComponent)
  225. ;
  226.     IF ¬ GENERATINGCFM THEN
  227.         Macro
  228.         _UnregisterComponent
  229.             moveq               #2,d0
  230.             dc.w                $A82A
  231.         EndM
  232.     ELSE
  233.         IMPORT_CFM_FUNCTION UnregisterComponent
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal Component FindNextComponent(Component aComponent, ComponentDescription *looking)
  238. ;
  239.     IF ¬ GENERATINGCFM THEN
  240.         Macro
  241.         _FindNextComponent
  242.             moveq               #4,d0
  243.             dc.w                $A82A
  244.         EndM
  245.     ELSE
  246.         IMPORT_CFM_FUNCTION FindNextComponent
  247.     ENDIF
  248.  
  249. ;
  250. ; pascal long CountComponents(ComponentDescription *looking)
  251. ;
  252.     IF ¬ GENERATINGCFM THEN
  253.         Macro
  254.         _CountComponents
  255.             moveq               #3,d0
  256.             dc.w                $A82A
  257.         EndM
  258.     ELSE
  259.         IMPORT_CFM_FUNCTION CountComponents
  260.     ENDIF
  261.  
  262. ;
  263. ; pascal OSErr GetComponentInfo(Component aComponent, ComponentDescription *cd, Handle componentName, Handle componentInfo, Handle componentIcon)
  264. ;
  265.     IF ¬ GENERATINGCFM THEN
  266.         Macro
  267.         _GetComponentInfo
  268.             moveq               #5,d0
  269.             dc.w                $A82A
  270.         EndM
  271.     ELSE
  272.         IMPORT_CFM_FUNCTION GetComponentInfo
  273.     ENDIF
  274.  
  275. ;
  276. ; pascal long GetComponentListModSeed(void )
  277. ;
  278.     IF ¬ GENERATINGCFM THEN
  279.         Macro
  280.         _GetComponentListModSeed
  281.             moveq               #6,d0
  282.             dc.w                $A82A
  283.         EndM
  284.     ELSE
  285.         IMPORT_CFM_FUNCTION GetComponentListModSeed
  286.     ENDIF
  287.  
  288. ;
  289. ; pascal long GetComponentTypeModSeed(OSType componentType)
  290. ;
  291.     IF ¬ GENERATINGCFM THEN
  292.         Macro
  293.         _GetComponentTypeModSeed
  294.             moveq               #44,d0
  295.             dc.w                $A82A
  296.         EndM
  297.     ELSE
  298.         IMPORT_CFM_FUNCTION GetComponentTypeModSeed
  299.     ENDIF
  300.  
  301. ;
  302. ;*******************************************************
  303. ;* Component Instance Allocation and dispatch routines 
  304. ;*******************************************************
  305. ;
  306. ;
  307. ; pascal OSErr OpenAComponent(Component aComponent, ComponentInstance *ci)
  308. ;
  309.     IF ¬ GENERATINGCFM THEN
  310.         Macro
  311.         _OpenAComponent
  312.             moveq               #45,d0
  313.             dc.w                $A82A
  314.         EndM
  315.     ELSE
  316.         IMPORT_CFM_FUNCTION OpenAComponent
  317.     ENDIF
  318.  
  319. ;
  320. ; pascal ComponentInstance OpenComponent(Component aComponent)
  321. ;
  322.     IF ¬ GENERATINGCFM THEN
  323.         Macro
  324.         _OpenComponent
  325.             moveq               #7,d0
  326.             dc.w                $A82A
  327.         EndM
  328.     ELSE
  329.         IMPORT_CFM_FUNCTION OpenComponent
  330.     ENDIF
  331.  
  332. ;
  333. ; pascal OSErr CloseComponent(ComponentInstance aComponentInstance)
  334. ;
  335.     IF ¬ GENERATINGCFM THEN
  336.         Macro
  337.         _CloseComponent
  338.             moveq               #8,d0
  339.             dc.w                $A82A
  340.         EndM
  341.     ELSE
  342.         IMPORT_CFM_FUNCTION CloseComponent
  343.     ENDIF
  344.  
  345. ;
  346. ; pascal OSErr GetComponentInstanceError(ComponentInstance aComponentInstance)
  347. ;
  348.     IF ¬ GENERATINGCFM THEN
  349.         Macro
  350.         _GetComponentInstanceError
  351.             moveq               #10,d0
  352.             dc.w                $A82A
  353.         EndM
  354.     ELSE
  355.         IMPORT_CFM_FUNCTION GetComponentInstanceError
  356.     ENDIF
  357.  
  358. ;
  359. ;*******************************************************
  360. ;*                                                        *
  361. ;*                      CALLS MADE BY COMPONENTS              *
  362. ;*                                                        *
  363. ;*******************************************************
  364. ;
  365. ;
  366. ;*******************************************************
  367. ;* Component Management routines
  368. ;*******************************************************
  369. ;
  370. ;
  371. ; pascal void SetComponentInstanceError(ComponentInstance aComponentInstance, OSErr theError)
  372. ;
  373.     IF ¬ GENERATINGCFM THEN
  374.         Macro
  375.         _SetComponentInstanceError
  376.             moveq               #11,d0
  377.             dc.w                $A82A
  378.         EndM
  379.     ELSE
  380.         IMPORT_CFM_FUNCTION SetComponentInstanceError
  381.     ENDIF
  382.  
  383. ;
  384. ; pascal long GetComponentRefcon(Component aComponent)
  385. ;
  386.     IF ¬ GENERATINGCFM THEN
  387.         Macro
  388.         _GetComponentRefcon
  389.             moveq               #16,d0
  390.             dc.w                $A82A
  391.         EndM
  392.     ELSE
  393.         IMPORT_CFM_FUNCTION GetComponentRefcon
  394.     ENDIF
  395.  
  396. ;
  397. ; pascal void SetComponentRefcon(Component aComponent, long theRefcon)
  398. ;
  399.     IF ¬ GENERATINGCFM THEN
  400.         Macro
  401.         _SetComponentRefcon
  402.             moveq               #17,d0
  403.             dc.w                $A82A
  404.         EndM
  405.     ELSE
  406.         IMPORT_CFM_FUNCTION SetComponentRefcon
  407.     ENDIF
  408.  
  409. ;
  410. ; pascal short OpenComponentResFile(Component aComponent)
  411. ;
  412.     IF ¬ GENERATINGCFM THEN
  413.         Macro
  414.         _OpenComponentResFile
  415.             moveq               #21,d0
  416.             dc.w                $A82A
  417.         EndM
  418.     ELSE
  419.         IMPORT_CFM_FUNCTION OpenComponentResFile
  420.     ENDIF
  421.  
  422. ;
  423. ; pascal OSErr OpenAComponentResFile(Component aComponent, short *resRef)
  424. ;
  425.     IF ¬ GENERATINGCFM THEN
  426.         Macro
  427.         _OpenAComponentResFile
  428.             moveq               #47,d0
  429.             dc.w                $A82A
  430.         EndM
  431.     ELSE
  432.         IMPORT_CFM_FUNCTION OpenAComponentResFile
  433.     ENDIF
  434.  
  435. ;
  436. ; pascal OSErr CloseComponentResFile(short refnum)
  437. ;
  438.     IF ¬ GENERATINGCFM THEN
  439.         Macro
  440.         _CloseComponentResFile
  441.             moveq               #24,d0
  442.             dc.w                $A82A
  443.         EndM
  444.     ELSE
  445.         IMPORT_CFM_FUNCTION CloseComponentResFile
  446.     ENDIF
  447.  
  448. ;
  449. ;*******************************************************
  450. ;* Component Instance Management routines
  451. ;*******************************************************
  452. ;
  453. ;
  454. ; pascal Handle GetComponentInstanceStorage(ComponentInstance aComponentInstance)
  455. ;
  456.     IF ¬ GENERATINGCFM THEN
  457.         Macro
  458.         _GetComponentInstanceStorage
  459.             moveq               #12,d0
  460.             dc.w                $A82A
  461.         EndM
  462.     ELSE
  463.         IMPORT_CFM_FUNCTION GetComponentInstanceStorage
  464.     ENDIF
  465.  
  466. ;
  467. ; pascal void SetComponentInstanceStorage(ComponentInstance aComponentInstance, Handle theStorage)
  468. ;
  469.     IF ¬ GENERATINGCFM THEN
  470.         Macro
  471.         _SetComponentInstanceStorage
  472.             moveq               #13,d0
  473.             dc.w                $A82A
  474.         EndM
  475.     ELSE
  476.         IMPORT_CFM_FUNCTION SetComponentInstanceStorage
  477.     ENDIF
  478.  
  479. ;
  480. ; pascal long GetComponentInstanceA5(ComponentInstance aComponentInstance)
  481. ;
  482.     IF ¬ GENERATINGCFM THEN
  483.         Macro
  484.         _GetComponentInstanceA5
  485.             moveq               #14,d0
  486.             dc.w                $A82A
  487.         EndM
  488.     ELSE
  489.         IMPORT_CFM_FUNCTION GetComponentInstanceA5
  490.     ENDIF
  491.  
  492. ;
  493. ; pascal void SetComponentInstanceA5(ComponentInstance aComponentInstance, long theA5)
  494. ;
  495.     IF ¬ GENERATINGCFM THEN
  496.         Macro
  497.         _SetComponentInstanceA5
  498.             moveq               #15,d0
  499.             dc.w                $A82A
  500.         EndM
  501.     ELSE
  502.         IMPORT_CFM_FUNCTION SetComponentInstanceA5
  503.     ENDIF
  504.  
  505. ;
  506. ; pascal long CountComponentInstances(Component aComponent)
  507. ;
  508.     IF ¬ GENERATINGCFM THEN
  509.         Macro
  510.         _CountComponentInstances
  511.             moveq               #19,d0
  512.             dc.w                $A82A
  513.         EndM
  514.     ELSE
  515.         IMPORT_CFM_FUNCTION CountComponentInstances
  516.     ENDIF
  517.  
  518. ;  useful helper routines for convenient method dispatching 
  519. ;
  520. ; pascal long CallComponentFunction(ComponentParameters *params, ComponentFunctionUPP func)
  521. ;
  522.     IF ¬ GENERATINGCFM THEN
  523.         Macro
  524.         _CallComponentFunction
  525.             dc.w                $70FF
  526.             dc.w                $A82A
  527.         EndM
  528.     ELSE
  529.         IMPORT_CFM_FUNCTION CallComponentFunction
  530.     ENDIF
  531.  
  532. ;
  533. ; pascal long CallComponentFunctionWithStorage(Handle storage, ComponentParameters *params, ComponentFunctionUPP func)
  534. ;
  535.     IF ¬ GENERATINGCFM THEN
  536.         Macro
  537.         _CallComponentFunctionWithStorage
  538.             dc.w                $70FF
  539.             dc.w                $A82A
  540.         EndM
  541.     ELSE
  542.         IMPORT_CFM_FUNCTION CallComponentFunctionWithStorage
  543.     ENDIF
  544.  
  545.     IF GENERATINGPOWERPC THEN
  546. ;
  547. ; pascal long CallComponentFunctionWithStorageProcInfo(Handle storage, ComponentParameters *params, ProcPtr func, long funcProcInfo)
  548. ;
  549.     IF GENERATINGCFM THEN
  550.         IMPORT_CFM_FUNCTION CallComponentFunctionWithStorageProcInfo
  551.     ENDIF
  552.  
  553.     ELSE
  554.     ENDIF
  555. ;
  556. ; pascal long DelegateComponentCall(ComponentParameters *originalParams, ComponentInstance ci)
  557. ;
  558.     IF ¬ GENERATINGCFM THEN
  559.         Macro
  560.         _DelegateComponentCall
  561.             moveq               #36,d0
  562.             dc.w                $A82A
  563.         EndM
  564.     ELSE
  565.         IMPORT_CFM_FUNCTION DelegateComponentCall
  566.     ENDIF
  567.  
  568. ;
  569. ; pascal OSErr SetDefaultComponent(Component aComponent, short flags)
  570. ;
  571.     IF ¬ GENERATINGCFM THEN
  572.         Macro
  573.         _SetDefaultComponent
  574.             moveq               #30,d0
  575.             dc.w                $A82A
  576.         EndM
  577.     ELSE
  578.         IMPORT_CFM_FUNCTION SetDefaultComponent
  579.     ENDIF
  580.  
  581. ;
  582. ; pascal ComponentInstance OpenDefaultComponent(OSType componentType, OSType componentSubType)
  583. ;
  584.     IF ¬ GENERATINGCFM THEN
  585.         Macro
  586.         _OpenDefaultComponent
  587.             moveq               #33,d0
  588.             dc.w                $A82A
  589.         EndM
  590.     ELSE
  591.         IMPORT_CFM_FUNCTION OpenDefaultComponent
  592.     ENDIF
  593.  
  594. ;
  595. ; pascal OSErr OpenADefaultComponent(OSType componentType, OSType componentSubType, ComponentInstance *ci)
  596. ;
  597.     IF ¬ GENERATINGCFM THEN
  598.         Macro
  599.         _OpenADefaultComponent
  600.             moveq               #46,d0
  601.             dc.w                $A82A
  602.         EndM
  603.     ELSE
  604.         IMPORT_CFM_FUNCTION OpenADefaultComponent
  605.     ENDIF
  606.  
  607. ;
  608. ; pascal Component CaptureComponent(Component capturedComponent, Component capturingComponent)
  609. ;
  610.     IF ¬ GENERATINGCFM THEN
  611.         Macro
  612.         _CaptureComponent
  613.             moveq               #28,d0
  614.             dc.w                $A82A
  615.         EndM
  616.     ELSE
  617.         IMPORT_CFM_FUNCTION CaptureComponent
  618.     ENDIF
  619.  
  620. ;
  621. ; pascal OSErr UncaptureComponent(Component aComponent)
  622. ;
  623.     IF ¬ GENERATINGCFM THEN
  624.         Macro
  625.         _UncaptureComponent
  626.             moveq               #29,d0
  627.             dc.w                $A82A
  628.         EndM
  629.     ELSE
  630.         IMPORT_CFM_FUNCTION UncaptureComponent
  631.     ENDIF
  632.  
  633. ;
  634. ; pascal long RegisterComponentResourceFile(short resRefNum, short global)
  635. ;
  636.     IF ¬ GENERATINGCFM THEN
  637.         Macro
  638.         _RegisterComponentResourceFile
  639.             moveq               #20,d0
  640.             dc.w                $A82A
  641.         EndM
  642.     ELSE
  643.         IMPORT_CFM_FUNCTION RegisterComponentResourceFile
  644.     ENDIF
  645.  
  646. ;
  647. ; pascal OSErr GetComponentIconSuite(Component aComponent, Handle *iconSuite)
  648. ;
  649.     IF ¬ GENERATINGCFM THEN
  650.         Macro
  651.         _GetComponentIconSuite
  652.             moveq               #41,d0
  653.             dc.w                $A82A
  654.         EndM
  655.     ELSE
  656.         IMPORT_CFM_FUNCTION GetComponentIconSuite
  657.     ENDIF
  658.  
  659. ;
  660. ;*******************************************************
  661. ;*                                                        *
  662. ;*              Direct calls to the Components                *
  663. ;*                                                        *
  664. ;*******************************************************
  665. ;
  666. ;  Old style names
  667. ;
  668. ; pascal long ComponentFunctionImplemented(ComponentInstance ci, short ftnNumber)
  669. ;
  670.     IF ¬ GENERATINGCFM THEN
  671.         Macro
  672.         _ComponentFunctionImplemented
  673.             dc.w                $2F3C
  674.             dc.w                $0002
  675.             dc.w                $FFFD
  676.             moveq               #0,d0
  677.             dc.w                $A82A
  678.         EndM
  679.     ELSE
  680.         IMPORT_CFM_FUNCTION ComponentFunctionImplemented
  681.     ENDIF
  682.  
  683. ;
  684. ; pascal long GetComponentVersion(ComponentInstance ci)
  685. ;
  686.     IF ¬ GENERATINGCFM THEN
  687.         Macro
  688.         _GetComponentVersion
  689.             dc.w                $2F3C
  690.             dc.w                $0000
  691.             dc.w                $FFFC
  692.             moveq               #0,d0
  693.             dc.w                $A82A
  694.         EndM
  695.     ELSE
  696.         IMPORT_CFM_FUNCTION GetComponentVersion
  697.     ENDIF
  698.  
  699. ;
  700. ; pascal long ComponentSetTarget(ComponentInstance ci, ComponentInstance target)
  701. ;
  702.     IF ¬ GENERATINGCFM THEN
  703.         Macro
  704.         _ComponentSetTarget
  705.             dc.w                $2F3C
  706.             dc.w                $0004
  707.             dc.w                $FFFA
  708.             moveq               #0,d0
  709.             dc.w                $A82A
  710.         EndM
  711.     ELSE
  712.         IMPORT_CFM_FUNCTION ComponentSetTarget
  713.     ENDIF
  714.  
  715. ;  New style names
  716. ;
  717. ; pascal ComponentResult CallComponentOpen(ComponentInstance ci, ComponentInstance self)
  718. ;
  719.     IF ¬ GENERATINGCFM THEN
  720.         Macro
  721.         _CallComponentOpen
  722.             dc.w                $2F3C
  723.             dc.w                $0004
  724.             dc.w                $FFFF
  725.             moveq               #0,d0
  726.             dc.w                $A82A
  727.         EndM
  728.     ELSE
  729.         IMPORT_CFM_FUNCTION CallComponentOpen
  730.     ENDIF
  731.  
  732. ;
  733. ; pascal ComponentResult CallComponentClose(ComponentInstance ci, ComponentInstance self)
  734. ;
  735.     IF ¬ GENERATINGCFM THEN
  736.         Macro
  737.         _CallComponentClose
  738.             dc.w                $2F3C
  739.             dc.w                $0004
  740.             dc.w                $FFFE
  741.             moveq               #0,d0
  742.             dc.w                $A82A
  743.         EndM
  744.     ELSE
  745.         IMPORT_CFM_FUNCTION CallComponentClose
  746.     ENDIF
  747.  
  748. ;
  749. ; pascal ComponentResult CallComponentCanDo(ComponentInstance ci, short ftnNumber)
  750. ;
  751.     IF ¬ GENERATINGCFM THEN
  752.         Macro
  753.         _CallComponentCanDo
  754.             dc.w                $2F3C
  755.             dc.w                $0002
  756.             dc.w                $FFFD
  757.             moveq               #0,d0
  758.             dc.w                $A82A
  759.         EndM
  760.     ELSE
  761.         IMPORT_CFM_FUNCTION CallComponentCanDo
  762.     ENDIF
  763.  
  764. ;
  765. ; pascal ComponentResult CallComponentVersion(ComponentInstance ci)
  766. ;
  767.     IF ¬ GENERATINGCFM THEN
  768.         Macro
  769.         _CallComponentVersion
  770.             dc.w                $2F3C
  771.             dc.w                $0000
  772.             dc.w                $FFFC
  773.             moveq               #0,d0
  774.             dc.w                $A82A
  775.         EndM
  776.     ELSE
  777.         IMPORT_CFM_FUNCTION CallComponentVersion
  778.     ENDIF
  779.  
  780. ;
  781. ; pascal ComponentResult CallComponentRegister(ComponentInstance ci)
  782. ;
  783.     IF ¬ GENERATINGCFM THEN
  784.         Macro
  785.         _CallComponentRegister
  786.             dc.w                $2F3C
  787.             dc.w                $0000
  788.             dc.w                $FFFB
  789.             moveq               #0,d0
  790.             dc.w                $A82A
  791.         EndM
  792.     ELSE
  793.         IMPORT_CFM_FUNCTION CallComponentRegister
  794.     ENDIF
  795.  
  796. ;
  797. ; pascal ComponentResult CallComponentTarget(ComponentInstance ci, ComponentInstance target)
  798. ;
  799.     IF ¬ GENERATINGCFM THEN
  800.         Macro
  801.         _CallComponentTarget
  802.             dc.w                $2F3C
  803.             dc.w                $0004
  804.             dc.w                $FFFA
  805.             moveq               #0,d0
  806.             dc.w                $A82A
  807.         EndM
  808.     ELSE
  809.         IMPORT_CFM_FUNCTION CallComponentTarget
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal ComponentResult CallComponentUnregister(ComponentInstance ci)
  814. ;
  815.     IF ¬ GENERATINGCFM THEN
  816.         Macro
  817.         _CallComponentUnregister
  818.             dc.w                $2F3C
  819.             dc.w                $0000
  820.             dc.w                $FFF9
  821.             moveq               #0,d0
  822.             dc.w                $A82A
  823.         EndM
  824.     ELSE
  825.         IMPORT_CFM_FUNCTION CallComponentUnregister
  826.     ENDIF
  827.  
  828. ;
  829. ; pascal ComponentResult CallComponentGetMPWorkFunction(ComponentInstance ci, ComponentMPWorkFunctionUPP *workFunction, void **refCon)
  830. ;
  831.     IF ¬ GENERATINGCFM THEN
  832.         Macro
  833.         _CallComponentGetMPWorkFunction
  834.             dc.w                $2F3C
  835.             dc.w                $0008
  836.             dc.w                $FFF8
  837.             moveq               #0,d0
  838.             dc.w                $A82A
  839.         EndM
  840.     ELSE
  841.         IMPORT_CFM_FUNCTION CallComponentGetMPWorkFunction
  842.     ENDIF
  843.  
  844. ;  UPP call backs 
  845. ;  ProcInfos 
  846.     ENDIF ; __COMPONENTS__ 
  847.  
  848.